<%@page import="java.util.Date"%>
<%@page import="itsm.isperp.framework.core.context.ContextHolder"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%
	String path = request.getContextPath();
	String basePath = ContextHolder.getWebServerName(request);
%>

<!-- <div data-role="header" data-position="fixed">
	<a href="#" data-rel="back" data-icon="back">返回</a>
	<h1>知识详细</h1>

</div> -->

<div data-role="content" class="ui-content" role="main" style="overflow:auto;">
	<div class="nui-info">
		<div id="knowledgeTitle" class="title">${model.title}</div>
		<div class="categoryInfo">
			发布日期：
			<fmt:formatDate value="${model.publish_date}" pattern="yyyy-MM-dd" />
			&nbsp;&nbsp;提交人：${model.creator_name}&nbsp;&nbsp;
			浏览数(${model.read_times})&nbsp;&nbsp;评论数(${commentCount })
		</div>
		<div class="readInfo">
			知识分类：${model.treenode_name_path}&nbsp;&nbsp;关键词：${model.keyword} </a>
		</div>
		<div class="contents">
		  ${newContent }
		</div>
		<div class="code_comments code_module">
			</span> <a name="comments">最新评论<strong>(${commentCount })</strong> </a>
		</div>
		<div class="comments">
			<ul>
				<c:forEach items="${comments}" var="commentary" varStatus="status">
					<li class="row_${(status.index)%2 }">
						<table>
							<tr>
								<td class="portrait"><c:choose>
										<c:when test="${empty commentary.photo }">
											<img src="<%=basePath %>img/elements/profile/avatar.png">
										</c:when>
										<c:otherwise>
											<img src="<%=basePath %>${commentary.photo}">
										</c:otherwise>
									</c:choose></td>
								<td class="body">
									<div class="r_title">
										<b>${commentary.commenter_name}</b> 发表于
										<fmt:formatDate value="${commentary.comment_time}"
											pattern="yyyy-MM-dd HH:mm" />

										<div class="r_content TextContent">
											${commentary.content} <br>
										</div>
									</div>
							</tr>
						</table></li>
				</c:forEach>

			</ul>

		</div>

	</div>
</div>

<div data-role="footer">
	<h4>
		<span>©<%=new Date().getYear() + 1900%> <%=ContextHolder.getConfigByKey("companyName")%></span>
	</h4>
</div>